package com.stone.compose.ui

import androidx.compose.foundation.background
import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.stone.compose.route.RouteName
import com.stone.compose.ui.screen.home.HomeScreen
import com.stone.compose.ui.screen.login.LoginScreen
import com.stone.compose.ui.screen.message.MessageScreen


@Composable
fun AppNavHost() {

    val navController = rememberNavController()

    NavHost(
        modifier = Modifier.background(MaterialTheme.colors.background),
        navController = navController,
        startDestination = RouteName.LOGIN
    ){

        composable(route = RouteName.LOGIN) {
            LoginScreen(navController)
        }

        composable(route = RouteName.HOME) {
            HomeScreen()
        }
        composable(route = RouteName.MESSAGE) {
            MessageScreen()
        }
    }
}